package com.situ.day5;

import org.junit.Test;

import java.util.Arrays;

public class OOPDemo {

    @Test
    public void test4() {
        int max1 = Math.max(3, 2);
        System.out.println(max1);
        double max2 = Math.max(3.4, 5.1);
        System.out.println(max2);
        //Math math = new Math();

        //Arrays数组操作的工具类
        int[] array = {34, 45, 7, 89};
        //[I@6b71769e
        System.out.println(array);
        //[34, 45, 7, 89]
        System.out.println(Arrays.toString(array));
        Arrays.sort(array);
        //[7, 34, 45, 89]
        System.out.println(Arrays.toString(array));
        int index = Arrays.binarySearch(array, 45);
        System.out.println(index);//2

    }

    @Test
    public void test2() {
        Student student = new Student();
        student.name = "zhang";
        int age = student.getAge();
        student.country = "中";
        Student.country = "中华";
        student.show();
        student.print();
        Student.print();
    }


    @Test
    public void test1() {
        Student student = new Student(1, "zhangsan", 23, "Java250703");
        //com.situ.day5.Student@2752f6e2
        System.out.println(student.toString());
        System.out.println(student);
    }
}
